package week_01.Chicken.doubleLoop;

public class chicken100 {
    public static void main(String[] args) {
        int hen = 0;  //母鸡
        int cock = 0;  //公鸡
        int chick = 0;  //小鸡
        int money=100;
        long starTime = System.currentTimeMillis();
        long starTimeNS = System.nanoTime();
        for (int i = 1; i <= money/5; i++) {
            for (int j = 1; j <= money/3; j++) {
                cock = i;
                hen = j;
                chick = 100 - cock - hen;
                if (cock + hen + chick == 100) {
                }
            }
        }
        long endTime=System.currentTimeMillis();
        long endTimeNS = System.nanoTime();
        long time = endTime-starTime;
        long timeNS=endTimeNS-starTimeNS;
        System.out.println("运行时间"+time+"ms");
        System.out.println("运行时间"+timeNS+"ns");
    }
}
